﻿using Microsoft.Extensions.DependencyInjection;
using Syspetro.Core.SysInterface;
using Syspetro.Deploy.Jwt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Syspetro.DepRedis
{
    public static class ServiceCollection
    {
        public static IServiceCollection AddRedis(this IServiceCollection services)
        {
            services.AddTransient<ICache, RedisCacher>();
            services.AddTransient<ILock, RedisLocker>();
            services.AddScoped<ITokenCache, TokenRedisCache>();
            return services;
        }
    }
}
